/**
 *  @file SAXParser.h
 */
#ifndef _SAXPARSER_H_
#define _SAXPARSER_H_

#include "../../common/BaseObject.h"
#include "../../io/Stream.h"
#include "SAXHandler.h"

namespace cppflib
{

namespace xml
{

namespace sax
{

/**
 *  A class which parse a XML in the SAX way
 */
class _DLLAPI SAXParser : public BaseObject
{
private:
    void ReleaseBeforeThrowing();

public:
    SAXParser(void);
    virtual ~SAXParser(void);

    void Parse(pcwstr_t xmlFilePath, SAXHandler &handler);
    void Parse(io::Stream &stream, SAXHandler &handler);
};

} // end of namespace sax

} // end of namespace xml

} // end of namespace cppflib


#endif
